﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!--<Style x:Key="btnTest1" TargetType="{x:Type Button}">
        <Setter Property="Button.Background" Value="{StaticResource DegradeBckRdBtn}"/>
        <Setter Property="Height" Value="34"/>
        <Setter Property="BorderBrush" Value="{StaticResource BrushCouleur1Base}" />
        <Style.Triggers>
            <Trigger Property="Button.IsPressed" Value="True">
                <Setter Property="Button.Background" Value="Red" />
            </Trigger>
            <Trigger Property="Button.IsMouseOver" Value="True">
                <Setter Property="Button.Background" Value="Red"/>
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.25" Duration="0:0:0"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
            <Trigger Property="Button.IsFocused" Value="True">
                <Setter Property="Button.Background" Value="{StaticResource DegradeBckRdBtnSelected}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    
    <ControlTemplate x:Key="btnTemplate" TargetType="{x:Type Button}">
        <Border x:Name="Border"
                CornerRadius="10"
                BorderThickness="1"
                Padding="2"
                Background="{StaticResource DegradeBckRdBtn}">
            <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"
                              Content="{TemplateBinding Button.Content}"></ContentPresenter>        
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Button.IsMouseOver" Value="True">
                <Setter Property="Border.BorderBrush" Value="{StaticResource DegradeBckRdBtnSelected}"></Setter>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>-->
    <ControlTemplate TargetType="ToggleButton" x:Key="ComboBoxToggleButtonTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="16" />
            </Grid.ColumnDefinitions>
            <Border          BorderBrush="{StaticResource NormalBorderBrush}"          CornerRadius="2,2,2,2"          BorderThickness="1,1,1,1"          Name="Border"          Background="{StaticResource NormalBackgroundBrush}"          Grid.ColumnSpan="2" />
            <Border          Margin="1,1,1,1"          BorderBrush="{StaticResource NormalBorderBrush}"          CornerRadius="2,0,0,2"          BorderThickness="0,0,1,0"          Background="#FFEEEEEE"          Grid.Column="0" />
            <Path          Margin="0,0,3,0"          Data="M0,0L4,4 8,0z"          HorizontalAlignment="Center"          Fill="{StaticResource GlyphBrush}"          Name="Arrow"          VerticalAlignment="Center"          Width="8"          Grid.Column="1" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="UIElement.IsMouseOver" Value="True">
                <Setter Property="Panel.Background" TargetName="Border" Value="{StaticResource HighlightBackgroundBrush}"/>
            </Trigger>
            <Trigger Property="ToggleButton.IsChecked" Value="True">
                <Setter Property="Panel.Background" TargetName="Border" Value="{StaticResource NormalBackgroundBrush}"/>
                <Setter Property="Shape.Fill" TargetName="Arrow" Value="#FF8D979E"/>
            </Trigger>
            <Trigger Property="UIElement.IsEnabled" Value="False">
                <Setter Property="Panel.Background" TargetName="Border" Value="{StaticResource DisabledBackgroundBrush}"/>
                <Setter Property="Border.BorderBrush" TargetName="Border" Value="{StaticResource DisabledBorderBrush}"/>
                <Setter Property="TextElement.Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                <Setter Property="Shape.Fill" TargetName="Arrow" Value="#66FFFFFF"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate TargetType="TextBox" x:Key="ComboBoxTextBoxTemplate">
        <Border        Name="PART_ContentHost"        Background="{TemplateBinding Panel.Background}"        Focusable="False" />
    </ControlTemplate>
    <Style TargetType="{x:Type ComboBoxItem}">
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True"/>
        <Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="TextElement.Foreground"  Value="{StaticResource NormalForegroundBrush}"/>
        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border              Name="Border"              SnapsToDevicePixels="True"              Padding="2,2,2,2">
                        <ContentPresenter                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"                Content="{TemplateBinding ContentControl.Content}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ComboBoxItem.IsHighlighted" Value="True">
                            <Setter Property="Panel.Background" TargetName="Border" Value="{StaticResource HighlightBackgroundBrush}"/>
                        </Trigger>
                        <Trigger Property="UIElement.IsEnabled" Value="False">
                            <Setter Property="TextElement.Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>

